Skip to content

feat(cnb): 同步托管运行时归档(含 Eclipse JDT LS)到 CNB 镜像 - #127

Merged
1lck merged 1 commit into
mainfrom
feat/cnb-managed-runtime-mirrors
Dec 3, 2026
Merged

1lck merged 1 commit into
mainfrom
feat/cnb-managed-runtime-mirrors

Conversation

@1lck

@1lck 1lck commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

改动类型

  • 脚本、CI 或文档

改动说明

Eclipse JDT Language Server (download.eclipse.org/jdtls/milestones/...) 目前没有可用的国内公共开源镜像,导致国内用户首次使用 Java 插件自动下载 JDTLS 较慢或易超时。

本 PR 复用 Lithe-store 现有的 CNB 镜像流程,新增通用外部运行时镜像清单与校验:

  • 新增 lithe-runtime-mirrors.json:登记 eclipse-jdtls-1.61.0(jdt-language-server-1.61.0-202609031315.tar.gz,原样 SHA-256 校验,附 EPL-2.0 许可链接)。
  • 新增 scripts/validate-runtime-mirrors.mjs:校验 schemaVersion、唯一且有序的 ID、单段安全文件名、HTTPS 无凭据 URL、64 位小写 SHA-256 与许可信息。
  • 扩展 scripts/mirror-cnb.mjs:同步 lithe-runtime-mirrors.json 到 CNB managed-runtimes Release(https://cnb.cool/lithe-idea/Lithe-store/-/releases/download/managed-runtimes/jdt-language-server-1.61.0-202609031315.tar.gz),沿用 SHA-256 校验、断点/缓存跳过与过期资产清理,并将运行时包下载超时放宽到 180s。
  • 更新 .github/workflows/mirror-cnb.yml 与 .github/workflows/validate.yml:把 lithe-runtime-mirrors.json 纳入触发与校验,并将 scripts/mirror-cnb.test.mjs 纳入 CI 单元测试。
  • 在 scripts/mirror-cnb.test.mjs 补充受管运行时同步、缓存命中跳过、过期资产清理、SHA-256 校验拒绝及清单校验单元测试。

验证

  • node --test scripts/store.test.mjs scripts/plugin-deltas.test.mjs scripts/mirror-cnb.test.mjs:64/64 通过
  • node scripts/validate-index.mjs lithe-plugin-index.json:14 个插件全部通过
  • node scripts/validate-recommendations.mjs lithe-plugin-recommendations.json lithe-plugin-index.json:4 条推荐通过
  • node scripts/validate-runtime-mirrors.mjs lithe-runtime-mirrors.json:1 条运行时镜像通过

合入后 Mirror to CNB 工作流会自动将 jdt-language-server-1.61.0-202609031315.tar.gz 上传至 CNB managed-runtimes Release,供 Lithe-IDEA/lithe-plugin-java 配置为国内镜像源。

@1lck
1lck requested a review from xiaoyumuxi as a code owner December 3, 2026 03:10
@1lck
1lck merged commit 9357a01 into main Dec 3, 2026
1 check passed
@1lck
1lck deleted the feat/cnb-managed-runtime-mirrors branch December 3, 2026 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant